# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kompare
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/development/org.kde.kompare"
pkgdesc="Graphical File Differences Tool"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kcodecs5-dev
	kconfig5-dev
	kcoreaddons5-dev
	kdoctools5-dev
	kiconthemes5-dev
	kjobwidgets5-dev
	kparts5-dev
	ktexteditor5-dev
	kwidgetsaddons5-dev
	libkomparediff2-dev
	qt5-qtbase-dev
	samurai
	"
_repo_url="https://invent.kde.org/sdk/kompare.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kompare-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3131e5d3d7c158dfd7d07e96d48e1461de97e143d05daec6654333a4e0674cf2bd69f7debdabed3aa90073d5cc42a388b637e954f6db24a518cc238efb1e3abb  kompare-23.08.4.tar.xz
"
